<template>
    <div>
        <el-form-item label="导航栏">
            <el-select filterable v-model="data.options.defaultValue" @change="changeMenu">
                <el-option v-for="(item, menuIndex) in menuResult" :key="menuIndex" :value="item.schemeId" :label="item.schemeName"/>
            </el-select>
        </el-form-item>
    </div>
</template>
<script>
export default {
    name: 'BaseNavicon',
    props: {
        data: {
            type: Object
        },
        menuResult: {
            type: Array
        }
    },
    methods: {
        changeMenu(e) {
            let obj = {}
            obj = this.menuResult.find((item) => {
                return item.schemeId === e
            })
            this.data.options.menuName = obj.schemeName
            this.data.options.options = obj.menus.data
            this.data.options.menuId = e
        }
    }
}
</script>
